package org.eiahe.hr.attendance.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.attendance.domain.Holiday;

import java.time.LocalDate;

/**
 * 节假日业务对象
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Holiday.class, reverseConvertGenerate = false)
public class HolidayBo extends BaseEntity {

    /**
     * 节假日ID
     */
    @NotNull(message = "节假日ID不能为空", groups = { EditGroup.class })
    private Long holidayId;

    /**
     * 节假日日期
     */
    @NotNull(message = "节假日日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate holidayDate;

    /**
     * 节假日名称
     */
    @NotBlank(message = "节假日名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String holidayName;

    /**
     * 是否调休日(0否 1是)
     */
    private String isCompensatory;

    /**
     * 年份
     */
    @NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer year;

    /**
     * 状态(0正常 1停用)
     */
    private String status;

    /**
     * 备注
     */
    private String remark;
}
